<?php
function sum() {
	$arr = func_get_args();
	$sum = 0;
	foreach ($arr as $v) {
		$sum += $v;
	}
	return $sum;
}

function avg() {
	$arr = func_get_args();
	$sum = 0;
	foreach ($arr as $v) {
		$sum += $v;
	}
	$avg = $sum / func_num_args();
	return $avg;
}
